<template>
	<view>
		<view class="usera" v-if="org==1">我是商家1
			<image class="somall" src="../../static/img/logojole.png" mode="">
		</view>
		<view class="usera" v-else-if="org==0">我是普通用户0
			<image class="somall" src="../../static/img/joleLogo.png" mode=""></image>
		</view>

		<view class="users" v-if="org==1" @click="goTurnRole(0)">
			<image class="bigmore" src="../../static/img/joleLogo.png" mode="">成为普通用户
		</view>
		<view class="users" v-else-if="org==0" @click="goTurnRole(1)">
			<image class="bigmore" src="../../static/img/logojole.png" mode="">成为商家
		</view>

		<view class="main">注意事项：
			<view class="text" v-if="org==1">用户需要再次切换角色点击<text class="select">我的->成为商家</text>即可</view>
			<view class="text" v-else-if="org==0">用户需要再次切换角色点击<text class="select">我的->切换为普通用户</text>即可</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				org: ''
			}
		},
		onLoad(options) {
			this.org = options.org
		},
		methods: {
			goTurnRole(ChangeOrg) {
				uni.setStorage({
					key:'ChangeRole',
					data:{
						ChangeOrg:ChangeOrg
					},
					success(aa) {
						console.log(aa)
						uni.navigateBack(1)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.usera {
		width: 750rpx;
		text-align: center;
		margin: 50rpx auto;
		color: #686868;

		.somall {
			width: 60rpx;
			height: 60rpx;
			margin-bottom: -14rpx;
		}
	}

	.users {
		width: 750rpx;
		text-align: center;
		margin: 160rpx auto;

		.bigmore {
			width: 130rpx;
			height: 130rpx;
			display: block;
			text-align: center;
			margin: 15rpx auto;
		}
	}

	.main {
		width: 90%;
		margin: 50rpx auto;
		font-size: 24rpx;
		color: #686868;
	}

	.text {}

	.select {
		color: red;
	}
</style>
